package com.TTBook.core.author.model;

import java.io.Serializable;

public class Author implements Serializable {
    private String authorid;

    private String authorName;

    private String authorIntro;

    private static final long serialVersionUID = 1L;

    public String getAuthorid() {
        return authorid;
    }

    public void setAuthorid(String authorid) {
        this.authorid = authorid == null ? null : authorid.trim();
    }

    public String getAuthorName() {
        return authorName;
    }

    public void setAuthorName(String authorName) {
        this.authorName = authorName == null ? null : authorName.trim();
    }

    public String getAuthorIntro() {
        return authorIntro;
    }

    public void setAuthorIntro(String authorIntro) {
        this.authorIntro = authorIntro == null ? null : authorIntro.trim();
    }

    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (!(that instanceof Author)) {
            return false;
        }
        Author other = (Author) that;
        return this.getAuthorid() == null ? other == null : this.getAuthorid().equals(other.getAuthorid())
            && this.getAuthorName() == null ? other == null : this.getAuthorName().equals(other.getAuthorName())
            && this.getAuthorIntro() == null ? other == null : this.getAuthorIntro().equals(other.getAuthorIntro());
    }

    public int hashCode() {
        int hash = 23;
        if (getAuthorid() != null) {
            hash *= getAuthorid().hashCode();
        }
        if (getAuthorName() != null) {
            hash *= getAuthorName().hashCode();
        }
        if (getAuthorIntro() != null) {
            hash *= getAuthorIntro().hashCode();
        }
        return hash;
    }
}